import { CoreConfigFactory } from '../core-config-factory'

/**
 * 注册配置属性
 * @param option
 * @returns
 */
export const CoreConfigProperty = (option?: CoreConfigPropertyOption) => {
  return ((target: Object, propertyKey: string): void => {
    CoreConfigFactory.registryProperty(target, propertyKey, option)
  }) as PropertyDecorator
}

export interface CoreConfigPropertyOption {
  /**
   * 属性名
   */
  property?: string

  /**
   * 描述
   */
  description?: string
}
